/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package data_bases.DAO;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

/**
 *
 * @author JuanFelipe
 */
public class DataInstanceDAO {
    public Connection conn;

    public DataInstanceDAO(Connection conn) {
        this.conn = conn;
    }
    
    public ResultSet executeStatement( String sql ) throws SQLException {
        
        try {
            System.out.println( sql );
            Statement statement = conn.createStatement();
            ResultSet resultSet = statement.executeQuery( sql );
            return resultSet;
        } catch (SQLException e) {
            e.printStackTrace();
            throw e;
        }
    }
}
